ip and subnet calculator python